#pragma once

// Define some macros for Signal.

#define RETURN_NEW_SIG_ID(className)                                        \
    static Base::Sig::SigIdGenerator _id_of_##className(#className);        \
    return _id_of_##className.value();

#define RETURN_SIG_ID(className)                                            \
    return className::typeId();

#define DECLARE_SIG()                                                       \
    public:                                                                 \
        static  const void* typeId();                                       \
        virtual const void* id() const;

#define IMPLEMENT_SIG(className)                                            \
    const void* className::typeId()   { RETURN_NEW_SIG_ID(className) }      \
    const void* className::id() const { RETURN_SIG_ID(className) }